home *** CD-ROM | disk | FTP | other *** search
/ Chip 2000 May / Chip_2000-05_cd1.bin / sharewar / FFE / SOUND.SWG / 0046_Midi Basics #1.pas < prev    next >
Pascal/Delphi Source File  |  1997-05-11  |  7KB  |  147 lines

  1. PC/MIDI BASICS #1: WHAT IS MIDI?
  2. by Richard D. Clark (PCC RichC)
  3. 11/19/91
  4.  
  5. The Musical Instrument Digital Interface was introduced in 1983
  6. by a coalition of musical instrument manufacturers as a standard
  7. protocol with which electronic instruments -- specifically
  8. synthesizers -- could interchange data. At that time, its primary
  9. use was to allow one synth's keyboard to control the sounds of
  10. another, in a "master-slave" relationship. Even its inventors
  11. didn't foresee the complex and varied applications for which MIDI
  12. would be utilized within just a few years.
  13.  
  14. MIDI is "platform independent." That means that any device which
  15. conforms to the MIDI Specification, and is equipped with MIDI
  16. ports, can talk to and be understood by any other; this includes
  17. computers of different types (IBM, Macintosh, Amiga, Atari). 
  18.  
  19. ----------MIDI BASICS
  20.  
  21. Most users don't need to understand the "innards" of MIDI, just
  22. as knowledge of programming isn't necessary to use a word
  23. processor. To use MIDI hardware and software, you just need a
  24. fundamental understanding of the kinds of data being
  25. interchanged.
  26.  
  27. MIDI can transmit 16 channels of data simultaneously, in a
  28. process analogous to cable TV: there's only one data stream,
  29. carried by one cable; the "receiver" -- the MIDI device -- sorts
  30. the data into the 16 independent MIDI channels.
  31.  
  32. MIDI devices, in turn, can be set to respond to all, or only one
  33. MIDI channel. In this manner, one channel can contain "piano"
  34. data, which is recognized only by a synth set to that channel,
  35. while another contains only "bass" data.  Whether the synth
  36. *sounds* like a "piano" when it plays that data is dependent on
  37. its own settings and capabilities. If it's set to a "brass"
  38. sound, it will play the "piano" notes using the "brass" sound.
  39.  
  40. When MIDI data is transmitted, it is usually in "real time" --
  41. with the tempo of the music set by software, or by the person
  42. actually playing the controlling instrument. The exception to
  43. this is "system exclusive" (sysex) data, which is used for
  44. exchanging things like patch banks (sets of sounds) between MIDI
  45. devices.
  46.  
  47. Each channel carries data about the music being played. Some
  48. kinds of data are:
  49.  
  50.      *Note Data - Note Number, Note On, Note Off. Every note in
  51. the playable musical spectrum has its own unique MIDI note
  52. number. These commands simply transmit information about what key
  53. was pressed and when, and when it was released.
  54.  
  55.      *Velocity Data - Many (but not all) MIDI keyboards can send
  56. a different "velocity" value depending on how hard the key is
  57. struck. Velocity sensitivity is usually used to control volume;
  58. the harder the key is struck, the louder the note sounds, much
  59. like an analog instrument. Velocity values range from 1 (softest)
  60. to 128 (loudest). Many inexpensive or older MIDI keyboards cannot
  61. generate or respond to velocity data.
  62.  
  63.      *Program Change - Most synths can produce a variety of
  64. sounds; each sound has its own identity and program number.
  65. (These sounds are often called "patches," a holdover from the
  66. days when synth programming was done by physically patching
  67. cables between electronic modules.) Groups of patches are usually
  68. organized into "banks;" the number of patches per bank varies
  69. from one synth to the next. A MIDI Program Change command tells
  70. the synth which Program Number -- which of its built-in "sounds"
  71. -- to use when playing the note data.     
  72.  
  73.      *Pitch Bend - Data generated by the wheel or joystick
  74. control on the synth that bends notes up or down.     
  75.  
  76.      *Controller Data - The MIDI Specification allows for
  77. (potentially) 128 different controllers; some are standardized,
  78. and some are available to be assigned by a manufacturer for a
  79. particular function. Some of the standard controllers are:
  80. Controller #64, Damper Switch (Sustain Pedal);  #7, MIDI Volume
  81. (not velocity, but the "volume knob" function, in 128 steps);
  82. #10, Pan Position (left to right in 128 steps);  #1, Modulation
  83. Wheel; and several others. Not all devices can respond to all
  84. types of controllers.
  85.  
  86. It's important to remember that it's up to the receiving device
  87. to interpret the MIDI data stream. Sending note data to the MIDI
  88. IN port of a drum machine will produce drum sounds. If the note
  89. data was supposed to be a "piano" part, the results might be very
  90. interesting, but will not sound like a piano. Similarly, a device
  91. that cannot understand velocity data will simply ignore any
  92. that's received.
  93.  
  94. ----------MIDI PORTS
  95.  
  96. Most MIDI devices have either two or three MIDI jacks. They will
  97. be labeled, and will function, as follows:
  98.  
  99.      *MIDI IN - Receives data from the MIDI OUT or MIDI THRU of
  100. another MIDI device. Always receives ALL MIDI data present in the
  101. data stream; which data are responded to -- and how -- and which
  102. are ignored, is dependent upon the device's internal settings.
  103. Virtually all MIDI devices have a MIDI IN port.
  104.  
  105.      *MIDI OUT - MIDI data *generated* by the device is output at
  106. this port. Some devices which can respond to MIDI data, but do
  107. not generate any (certain effects devices, for example), will not
  108. include a MIDI OUT port.
  109.  
  110.      *MIDI THRU - The MIDI data stream which appears at the
  111. device's MIDI IN is simply "passed through," unaltered, to this
  112. port. This function allows several MIDI devices to be
  113. "daisy-chained like this:
  114.  
  115. CONTROLLER MIDI OUT --> DEVICE 1/ MIDI IN
  116.                           MIDI THRU ----> DEVICE 2/MIDI IN
  117.                                             MIDI THRU ----> Etc.
  118.  
  119. Some older MIDI devices have only two ports, IN and OUT. Some of
  120. these devices allow you to switch the OUT port to function as a
  121. THRU port; others don't, which means they must be connected at
  122. the end of the "daisy-chain."
  123.  
  124. ----------SUMMARY
  125.  
  126. *MIDI is a communication protocol, designed primarily for
  127. electronic music.
  128. *MIDI is a platform-independent, universal standard.
  129. *There are 16 MIDI channels, combined into a single data stream.
  130. *MIDI data can include note, velocity, program change, controller
  131. and other data.
  132. *MIDI devices are connected via their MIDI IN, OUT and THRU
  133. ports.
  134.  
  135. Next:
  136. "PC/MIDI BASICS #2" (MIDI#2.DOC) discusses the hardware interface
  137. between MIDI devices and personal computers (specifically,
  138. IBM-compatibles).
  139.  
  140. The PC/MIDI BASICS files are published irregularly and available
  141. in the Music & Sound Text Library of the AOL Music and Sound
  142. Forum.
  143.  
  144. (c)Copyright 1991 by Richard D. Clark/Fundamentally Sound. This
  145. file may be freely distributed only in its original form.
  146. Suggestions/corrections/additions may be e-mailed on America
  147. Online/PCLink to PCC RichC.